package grape.workflow.rest.task.form;

import grape.common.rest.form.BaseForm;
import grape.common.rest.validation.props.PropValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * 任务指派表单
 * Created by yangwei
 * Created at 2020/6/16 18:28
 */
@PropValid
@Data
@EqualsAndHashCode(callSuper=false)
@ApiModel(value="任务指派表单对象")
public class TaskAssignForm extends BaseForm {

    @NotNull(message = "是否指派给自己不能为空")
    @ApiModelProperty(value = "是否指派给自己")
    private Boolean isAssignMe;

    @PropValid.DependCondition(message = "指派用户id不能为空",dependProp = "isAssignMe",ifEqual = "false")
    @ApiModelProperty(value = "指派用户id")
    private String userId;
}
